package com.bgs.travelapp.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    TokenCheck tokenCheck;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenCheck).addPathPatterns("/**").excludePathPatterns("/scenicRank/getRanking","/scenic/getScenicNameByScenicName","/userManagement/loginByUser","/tourNote/getTourNoteAllByCityId","/comment/getCommentAllByTravesId","/Alipay/return","/Alipay/notify","/tourNote/updatetTourNote","/tourNote/getToueNoteById","/collection/getCollectionScenic","/imserver/**","/tourNote/getTourNoteAll","/login/sendCodeByQQMailRe","/login/registerUser","/login/checkMail","/user/checkLoginName","/scenic/getScenicByCityId","/login/loginByQQCode","/login/sendCodeByQQMail","/scenic/getScenicImageFirstById","/ticket/getSurplusTicket","/scenic/scenicDetailsAllById","/scenic/scenicAllByCirtId","/login/loginByPhone","/login/sendCodeByPhone","/login/loginByUser","/getImageById","/area/getCitysByFirst","/area/getProvinceAll");
    }
}
